package com.team11.server.service.admin;


import com.team11.server.mapper.Admin_SelS_InP_Mapper;
import com.team11.server.pojo.P_C_S_T_information;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Admin_SelS_InP_Service {
    @Autowired
    private Admin_SelS_InP_Mapper admin_selS_inP_mapper;
    public List<P_C_S_T_information> selS_inP(Integer pId){
        List<P_C_S_T_information> lists=admin_selS_inP_mapper.SelAll_S_inP(pId);
        for (P_C_S_T_information o:lists){
            String sID=admin_selS_inP_mapper.SelSNameBySid(o.getPSetLeader());
            if (sID.equals(o.getSNumber())){
                o.setIsLeader(1);
                break;
            }
        }
        return lists;
    }
}
